<div class=page_head>
  <h2><%="To do list".t%></h2>
</div>
<%if @todos.size == 0%>
 <div class=tour>
   <%="Make lists, add items, and check them off. Get things done with to-do lists.".t%>
 </div>
 <%=feature'todo'%>
<%else%>
<table class="data">
<% p = nil%>
<% for todo in @todos %>
<% if p != todo.project%>
 <% p = todo.project%>
  <tr>
     <td colspan=2><h3><%=image_tag"prj_icon.png"%><%=link_to todo.project.name,logs_url(todo.project)%></h3></td>
  </tr>
<%end%>
  <tr>
     <td valign=top width=20% align=right style="border-bottom:0px;border-right:1px #ccc solid">
     <strong><%=todo.name%>:</strong>
     </td>
     <td>
        <div id='todo_item_list_<%=todo.id%>'>
         <%=render :partial=>'todo_item_list',:locals=>{:todo_items => todo.todo_items}%>
        </div>
        <div id='finished_todo_item_list_<%=todo.id%>'>
         <%=render :partial=>'finished_todo_item_list',:locals=>{:todo_items => todo.finished_todo_items}%>
        </div>
     </td>
  </tr>
<% end %>
</table>
<% end %>
